<template>
  <div>
    <div @click="toride">
      <h1>骑手</h1>
    </div>
    <div @click="touser">
      <h1>用户</h1>
    </div>
    <div @click="toexit">
      <h1>退出</h1>
    </div>
  </div>
</template>
<script>
export default {
  data() {
    return {};
  },
  beforeCreate: function() {
    //创建前
  },
  created: function() {
    //创建后
  },
  beforeMount: function() {
    //挂载前
  },
  mounted: function() {
    //挂载后
  },
  beforeUpdate: function() {
    //更新前
  },
  update: function() {
    //更新后
  },
  methods: {
    toride() {
      let that = this;
      that.$router.push({
        name: "ride"
      });
    },
    touser() {
      let that = this;
      that.$router.push({
        name: "user"
      });
    },
    toexit(){
        let that = this;
        localStorage.removeItem('userid')
      that.$router.push({
        name: "login"
      });
    }
  }
};
</script>
<style>
</style>